﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AppMain
{
    public class BaseRole : IRole
    {
        public BaseRole(IAttrMap attrMap)
        {
            this.attrMap = attrMap;
            initAttrListener();
            initialize();
        }

        protected virtual void initAttrListener()
        {

        }

        protected virtual void initialize()
        {

        }

        public long UID => this.AttrMap.getAttr<long>(RoleAttr.RoleId).Value;

        private IAttrMap attrMap;
        public IAttrMap AttrMap => attrMap;

        public virtual bool CanRemove => false;

        public virtual void dispose()
        {

        }

        public virtual void tick(float frameTime)
        {

        }
    }
}
